<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
  <meta name="copyright" content=
  "Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
  <title>Creating linked resources</title>
  <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"></script>
</head>
<body bgcolor="#FFFFFF">
  <h1>Creating linked resources</h1>
  <p>Folders and files can be linked to locations in the file system outside of the project's location. These special
  folders and files are called <a href="../concepts/concepts-13.htm">linked resources</a>.</p>
  <p>To create a linked folder:</p>
  <ol>
    <li>In one of the navigation views, right-click the project or folder where you want to create the linked
    folder.</li>
    <li>From the pop-up menu, select <a class="command-link" href=
    'javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.ui.wizards.new.folder)")'><img src=
    "PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>New &gt; Folder</b></a>.</li>
    <li>Specify the name of the folder as it will appear in the workbench. This name can be different from the name of
    the folder in the file system.</li>
    <li>Click <b>Advanced</b>.</li>
    <li>Check <b>Link to alternate location (Linked Folder)</b>.</li>
    <li>Enter a file system path, or click <b>Browse</b> to select a folder in the file system.</li>
    <li>Click <b>Finish</b>.</li>
  </ol>
  <p>To create a linked file, follow the same steps as above, except choose <a class="command-link" href=
  'javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.ui.wizards.new.file)")'><img src=
  "PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>New &gt; File</b></a> instead of <a class=
  "command-link" href=
  'javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.ui.wizards.new.folder)")'><img src=
  "PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>New &gt; Folder</b></a> in the context
  menu.</p>
  <p>Linked resource locations can also be specified relative to a variable. This makes it easier to share projects
  containing linked resources with other team members, since it avoids hard-coded absolute file system paths that may
  vary from one machine to the next.</p>
  <p>To define a linked resource relative to a path variable, do the following after step 5 above:</p>
  <ol start="6">
    <li>Click the <b>Variables</b> button.</li>
    <li>In the resulting dialog, select an existing path variable or create a new one.</li>
    <li>If the chosen variable defines the exact path of the linked resource, click <b>OK</b>. Otherwise, click
    <b>Extend</b> to specify a file or folder below the location described by the path variable, then click
    <b>OK</b>.</li>
    <li>Click <b>Finish</b>.</li>
  </ol>
  <p><em>Tip:</em> The <a class="command-link" href=
  'javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.LinkedResources)")'>
  <img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>General &gt; Workspace &gt; Linked
  Resources</b></a> preference page also allows you to define path variables.</p>
  <p>Note that, once you create a linked resource you will be able to change the link target path that you entered in
  step 6. or 8. above. by selecting the <b>Edit...</b> button in the <b>File &gt; Properties &gt; Resource</b> property
  page of the linked resource.</p>
  <h3 class="related">Related concepts</h3><a href="../concepts/concepts-12.htm">Resources</a><br>
  <a href="../concepts/concepts-17.htm">Resource hierarchies</a><br>
  <a href="../concepts/concepts-13.htm">Linked resources</a>
  <h3 class="related">Related tasks</h3><a href="tasks-42.htm">Creating a project</a><br>
  <a href="tasks-44.htm">Creating a file</a><br>
  <a href="tasks-43.htm">Creating a folder</a>
  <h3 class="related">Related reference</h3><a href="../reference/ref-14b.htm">Linked resources</a><br>
  <a href="../reference/ref-38.htm">New Folder wizard</a><br>
  <a href="../reference/ref-39.htm">New File wizard</a>
</body>
</html>
